export default {
  name: "entry",
  components: {
    resumeDetail: () => import("../../../../component/resumeDetail/index.vue"),

    companyDetail: () => import("../../../socical/socialCheck/check.vue")
  },
  // companyDetail: () => import("../../../../component/companyDetail/index.vue")
  props: {
    companyid: String,
	totalNum: Number
  },
  data() {
    return {
      loading: false,
      tableData: [],
      form: {
        companyid: "",
        type: '2', // 1->未处理, 2->已处理
        starttime: "",
        endtime: "",
        pagenum: 1,
        pagesize: 10,
		idname:'reviewid'
      },
      total: 0,
      dialogVisible1: false,
      dialogVisible2: false,
      userid: "",
      nickName: "",
      companyname: ""
    }
  },
  created() {
    this.form.companyid = this.companyid;
    this.getTableData();
  },
  methods: {
    getTableData() {
      this.loading = true;
      this.$axios.post("/app/v1/platform/abnormal/employeeList", this.form).then(res => {
        this.loading = false;
        if (res.data.code === 1) {
          this.tableData = res.data.data.list;
		  this.$emit('update:totalNum',this.tableData.length);
          this.total = +res.data.data.totalnum;
        } else {
          this.$message({
            message: res.data.message,
            type: "error"
          })
        }
      })
    },
    // 查看会员详情
    handleClickNickName(row) {
      this.userid = row.userid;
      this.nickName = row.nickname;
      this.dialogVisible1 = true;
    },
    // 查看公司详情
    handleClickCompanyName(row) {
      this.companyname = row.companyname;
      this.dialogVisible2 = true;
    },
    // 分页
    handleCurrentChange(val) {
      this.form.pagenum = val;
      this.getTableData();
    },
    handleSizeChange(val) {
      this.form.pagenum = 1;
      this.form.pagesize = val;
      this.getTableData();
    },
  }
}